\(\int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx\) [1548]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 12 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=-\frac {\text {arccosh}\left (-\frac {b x}{2}\right )}{b} \]

[Out]

-arccosh(-1/2*b*x)/b

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {54} \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=-\frac {\text {arccosh}\left (-\frac {b x}{2}\right )}{b} \]

[In]

Int[1/(Sqrt[-2 - b*x]*Sqrt[2 - b*x]),x]

[Out]

-(ArcCosh[-1/2*(b*x)]/b)

Rule 54

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ArcCosh[b*(x/a)]/b, x] /; FreeQ[{a,
 b, c, d}, x] && EqQ[a + c, 0] && EqQ[b - d, 0] && GtQ[a, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\cosh ^{-1}\left (-\frac {b x}{2}\right )}{b} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(60\) vs. \(2(12)=24\).

Time = 0.05 (sec) , antiderivative size = 60, normalized size of antiderivative = 5.00 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=\frac {\log \left (\sqrt {-2-b x}-\sqrt {2-b x}\right )}{b}-\frac {\log \left (b \sqrt {-2-b x}+b \sqrt {2-b x}\right )}{b} \]

[In]

Integrate[1/(Sqrt[-2 - b*x]*Sqrt[2 - b*x]),x]

[Out]

Log[Sqrt[-2 - b*x] - Sqrt[2 - b*x]]/b - Log[b*Sqrt[-2 - b*x] + b*Sqrt[2 - b*x]]/b

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(60\) vs. \(2(10)=20\).

Time = 0.54 (sec) , antiderivative size = 61, normalized size of antiderivative = 5.08

method result size
default \(\frac {\sqrt {\left (-b x -2\right ) \left (-b x +2\right )}\, \ln \left (\frac {b^{2} x}{\sqrt {b^{2}}}+\sqrt {b^{2} x^{2}-4}\right )}{\sqrt {-b x -2}\, \sqrt {-b x +2}\, \sqrt {b^{2}}}\) \(61\)

[In]

int(1/(-b*x-2)^(1/2)/(-b*x+2)^(1/2),x,method=_RETURNVERBOSE)

[Out]

((-b*x-2)*(-b*x+2))^(1/2)/(-b*x-2)^(1/2)/(-b*x+2)^(1/2)*ln(b^2*x/(b^2)^(1/2)+(b^2*x^2-4)^(1/2))/(b^2)^(1/2)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 28 vs. \(2 (10) = 20\).

Time = 0.23 (sec) , antiderivative size = 28, normalized size of antiderivative = 2.33 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=-\frac {\log \left (-b x + \sqrt {-b x + 2} \sqrt {-b x - 2}\right )}{b} \]

[In]

integrate(1/(-b*x-2)^(1/2)/(-b*x+2)^(1/2),x, algorithm="fricas")

[Out]

-log(-b*x + sqrt(-b*x + 2)*sqrt(-b*x - 2))/b

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 13.02 (sec) , antiderivative size = 78, normalized size of antiderivative = 6.50 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=- \frac {{G_{6, 6}^{6, 2}\left (\begin {matrix} \frac {1}{4}, \frac {3}{4} & \frac {1}{2}, \frac {1}{2}, 1, 1 \\0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 0 & \end {matrix} \middle | {\frac {4}{b^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} b} - \frac {i {G_{6, 6}^{2, 6}\left (\begin {matrix} - \frac {1}{2}, - \frac {1}{4}, 0, \frac {1}{4}, \frac {1}{2}, 1 & \\- \frac {1}{4}, \frac {1}{4} & - \frac {1}{2}, 0, 0, 0 \end {matrix} \middle | {\frac {4 e^{- 2 i \pi }}{b^{2} x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}} b} \]

[In]

integrate(1/(-b*x-2)**(1/2)/(-b*x+2)**(1/2),x)

[Out]

-meijerg(((1/4, 3/4), (1/2, 1/2, 1, 1)), ((0, 1/4, 1/2, 3/4, 1, 0), ()), 4/(b**2*x**2))/(4*pi**(3/2)*b) - I*me
ijerg(((-1/2, -1/4, 0, 1/4, 1/2, 1), ()), ((-1/4, 1/4), (-1/2, 0, 0, 0)), 4*exp_polar(-2*I*pi)/(b**2*x**2))/(4
*pi**(3/2)*b)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 26 vs. \(2 (10) = 20\).

Time = 0.21 (sec) , antiderivative size = 26, normalized size of antiderivative = 2.17 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=\frac {\log \left (2 \, b^{2} x + 2 \, \sqrt {b^{2} x^{2} - 4} b\right )}{b} \]

[In]

integrate(1/(-b*x-2)^(1/2)/(-b*x+2)^(1/2),x, algorithm="maxima")

[Out]

log(2*b^2*x + 2*sqrt(b^2*x^2 - 4)*b)/b

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 25 vs. \(2 (10) = 20\).

Time = 0.28 (sec) , antiderivative size = 25, normalized size of antiderivative = 2.08 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=\frac {2 \, \log \left (\sqrt {-b x + 2} - \sqrt {-b x - 2}\right )}{b} \]

[In]

integrate(1/(-b*x-2)^(1/2)/(-b*x+2)^(1/2),x, algorithm="giac")

[Out]

2*log(sqrt(-b*x + 2) - sqrt(-b*x - 2))/b

Mupad [B] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 52, normalized size of antiderivative = 4.33 \[ \int \frac {1}{\sqrt {-2-b x} \sqrt {2-b x}} \, dx=\frac {4\,\mathrm {atan}\left (\frac {b\,\left (-\sqrt {-b\,x-2}+\sqrt {2}\,1{}\mathrm {i}\right )}{\left (\sqrt {2}-\sqrt {2-b\,x}\right )\,\sqrt {-b^2}}\right )}{\sqrt {-b^2}} \]

[In]

int(1/((2 - b*x)^(1/2)*(- b*x - 2)^(1/2)),x)

[Out]

(4*atan((b*(2^(1/2)*1i - (- b*x - 2)^(1/2)))/((2^(1/2) - (2 - b*x)^(1/2))*(-b^2)^(1/2))))/(-b^2)^(1/2)